#include <stdio.h>

int main() {
	int a, b, c = 0;
	int count = 0;
	for (a = 1; a < 5; a++) {
		for (b = 1; b < 5; b++) {
			for (c = 1; c < 5; c++) {
				if (a != b && b != c && c != a) {
					printf("%d%d%d\n", a, b, c);
					count++;
				}
			}
		}
	}
	printf("count=%d\n", count);
	return 0;
}